All Questions
2 questions
4votes
2answers
484views
Vectorizing a pixel-averaging operation in Numpy
I am reading from a file containing some segments (irregular parcels of the image) and trying to average the entire segment to have one pixel value. This is the code I use: ...
3votes
1answer
930views
Using Gibbs sampling to segment an image
I have been reading some NumPy guides but can't seem to figure it out. My TA told me I should be able to speed up my code by using a NumPy array instead of a for ...